<template>
  <vxe-modal id="msgDetailDialog" v-model="showDialog" :destroy-on-close="true" width="70%" show-zoom resize remember storage>
    <template #title>
      <span>消息详情</span>
    </template>
    <template #default>
      <div>
        <div style="font-size:20px">{{ msg.title }}</div>
        <div>{{ msg.create_time }}</div>
        <el-divider />
        <span>{{ msg.content }}</span>
      </div>
    </template>
  </vxe-modal>
</template>

<script>
import * as api from '@/api/coder/msg'

export default {
  data() {
    return {
      showDialog: false,
      msg: {}
    }
  },
  methods: {
    show(no) {
      this.msg.no = no
      this.showDialog = true
      this.getMsg()
    },
    getMsg() {
      api.getMsgByNo(this.msg.no).then(res => {
        this.msg = res.msg
      })
    },
    close() {
      this.showDialog = false
    }
  }
}
</script>
